home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 4
/
Aminet 4 - November 1994.iso
/
aminet
/
comm
/
term
/
vltj5867.lha
/
VLT
/
rexx
/
VLTPhoneSetup.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1994-03-27
|
2KB
|
81 lines
/** VLTPhoneSetup.rexx
*
* This program sets up a VLTPhoneBook directory and assigns VLTPhoneBook:
* to it. Must be run from inside VLT.
*
* By W.G.J. Langeveld, February 1992.
*
**/
/*
* Add libraries if necessary
*/
if show("l", "rexxarplib.library") = 0 then do
check = addlib('rexxsupport.library', 0, -30, 0)
check = addlib('rexxarplib.library', 0, -30, 0)
end
/*
* Determine port and screen name and size
*/
vltport = address()
cols = ScreenCols(vltport)
if cols == -1 then do
vltscreen = ""
cols = ScreenCols()
rows = ScreenRows()
end
else do
vltscreen = vltport
rows = ScreenRows(vltscreen)
end
/*
* Check if the assignment already exists. If not ask if we should
* make one.
*/
call pragma('W','NULL')
if ~exists("VLTPhoneBook:") then do
prompts = "You have no VLT PhoneBook assignment.\"
prompts = prompts || "Do you want to make one now?"
test = Request(80, 50, prompts, , " Okay ", " Cancel ", vltscreen)
if test == "" then exit
end
/*
* Get a directory name for the phonebook.
*/
do forever
test = GetFile(80, 50,,, "Select PhoneBook Directory", vltscreen,"SAVE+NOFILES")
if test == "" then exit
if ~exists(test) then do
"message (Directory: "test" does not exist - try again); delay 1.5"
iterate
end
else leave
end
/*
* Make the assignment.
*/
number = FileList(test, files, "D", "E")
test = files.1
address COMMAND "assign >nil: VLTPhoneBook: "test
if ~exists("VLTPhoneBook:T") then do
address COMMAND "makedir >nil: VLTPhoneBook:T"
end
if ~exists("VLTPhoneBook:T/dial_file") then do
address COMMAND 'echo >VLTPhoneBook:T/dial_file " "'
end
msg = "You should probably put an assignment in your" || '0a'x
msg = msg || "startup sequence:" || '0a'x
msg = msg || "assign VLTPhoneBook: " || test '0a'x || '0a'x
msg = msg || "You may also want to edit VLTPhoneDial.rexx if" || '0a'x
msg = msg || "your modem is not Hayes compatible."
"message ("msg")"
exit